package com.idak.spring.jdbc.bean;

import java.text.SimpleDateFormat;
import java.util.Date;

public class User {
	private Integer userId;
	private String login;
	private String password;
	private Date dtCreate;
	private Date dtModif;
	private Date dtEnd;
	
	public User() {}
	
	public Integer getUserId() {return userId;}
	public void setUserId(Integer userId) {this.userId = userId;}
	
	public String getLogin() {return login;}
	public void setLogin(String login) {this.login = login;}
	
	public String getPassword() {return password;}
	public void setPassword(String password) {this.password = password;}
	
	public Date getDtCreate() {return dtCreate;}
	public void setDtCreate(Date dtCreate) {this.dtCreate = dtCreate;}
	
	public Date getDtModif() {return dtModif;}
	public void setDtModif(Date dtModif) {this.dtModif = dtModif;}
	
	public Date getDtEnd() {return dtEnd;}
	public void setDtEnd(Date dtEnd) {this.dtEnd = dtEnd;}
	
	public String toString() {
		SimpleDateFormat formatDate = new SimpleDateFormat("dd/MM/yyyy");
		String dateCreation = formatDate.format(dtCreate);
		return "USER : [USER_ID : "+this.userId+", LOGIN : "+this.login+", DT_CREATE : "+dateCreation+"]";
	}
	
}
